cmake_minimum_required(VERSION 3.6.0)

project("codec")

add_library(
        codec
        SHARED
        codec.cpp
        audio/audioutils.cpp)

include_directories(include)

set(ffmpeg_lib_dir ${PROJECT_SOURCE_DIR}/../../../libs/${ANDROID_ABI})

find_library(
        log-lib
        log)

target_link_libraries(
        codec
        ${ffmpeg_lib_dir}/libavcodec.so
        ${ffmpeg_lib_dir}/libavfilter.so
        ${ffmpeg_lib_dir}/libavformat.so
        ${ffmpeg_lib_dir}/libavutil.so
        ${ffmpeg_lib_dir}/libpostproc.so
        ${ffmpeg_lib_dir}/libswresample.so
        ${ffmpeg_lib_dir}/libswscale.so
        ${log-lib})